<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>css组选择器演示</title>

    <style>

        /* .div1 {
            width: 100px;
            height: 100px;
            background: red;
        }
        .div2 {
            width: 100px;
            height: 100px;
            background: yellow;
        }
        .div3 {
            width: 100px;
            height: 100px;
            background: green;
        } */

        /* 定义了一个组选择器，效果相当于定义了三个类选择器 */
        .div1, .div2, .div3 {
            width: 100px;
            height: 100px;
        }
        /* 下面的类选择器好比给上面的对应的类选择器添加样式属性 */
        .div1 {
            background: red;
        }
        .div2 {
            background: yellow;
        }
        .div3 {
            background: green;
        }
    </style>
</head>
<body>
    <!-- div*3 创建三个div标签 -->
    <div class="div1"></div>
    <div class="div2"></div>
    <div class="div3"></div>
</body>
</html>